/**
 * @Description TODO
 * @Author hhy
 * @Date 2020/9/23 11:03
 */
public class Zoo {
    public static void main(String[] args) {
        Snake python = new Python("蟒蛇","蟒蛇");
        Cat orangeCat = new OrangeCat("橘猫","猫");
        Cat shortCat = new OrangeCat("美短","猫");

        python.say();
        python.eat();
        python.play();

        orangeCat.say();
        orangeCat.eat();
        orangeCat.play();

        shortCat.say();
        shortCat.eat();
        shortCat.play();



        if (python instanceof Snake){
            System.out.println(python.getName()+"是蛇");
        }

        if (orangeCat instanceof Cat){
            System.out.println(orangeCat.getName()+"是猫");
        }

        if (shortCat instanceof Cat){
            System.out.println(shortCat.getName()+"是猫");
        }
    }
}
